package cz.proks.schoolpupilbook.gwt.widget.parent;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;

import cz.proks.schoolpupilbook.gwt.widget.common.LoggedUserPanel;
import cz.proks.schoolpupilbook.gwt.widget.common.ParentView;
import cz.proks.schoolpupilbook.shared.domain.User;

public class ParentWidget extends Composite {

	private static ParentWidgetUiBinder uiBinder = GWT.create(ParentWidgetUiBinder.class);

	interface ParentWidgetUiBinder extends UiBinder<Widget, ParentWidget> {
	}
	
	@UiField LoggedUserPanel loggedUserPanel;
	@UiField(provided = true) ParentView parentView;

	public ParentWidget(User user) {
		parentView = new ParentView(user);
		initWidget(uiBinder.createAndBindUi(this));
	}

	public LoggedUserPanel getLoggedUserPanel() {
		return loggedUserPanel;
	}

	public ParentView getParentView() {
		return parentView;
	}

}
